﻿using LJX.SmartPark.Common.Extensions;
using LJX.SmartPark.Common.ResponseOutput;
using LJX.SmartPark.Domain.SysManage;
using LJX.SmartPark.Service.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LJX.SmartPark.Service.SysManage
{
    public class ParameterSettingService:IParameterSettingService
    {
        private readonly IRepository<ParameterSetting> _ParameterSettingService;

        public ParameterSettingService(IRepository<ParameterSetting> ParameterSettingService)
        {
            _ParameterSettingService = ParameterSettingService;
        }

        public async Task<Response<List<ParameterSetting>>> GetParameterSettingPage()
        {
            var SmartLamps = await _ParameterSettingService.GetAllListAsync();
            var result = SmartLamps.MapToList<ParameterSetting>();
            return Response<List<ParameterSetting>>.Ok(result);
        }
    }
}
